package kr.hkit.powerjava.alone;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.BoxLayout;
import java.awt.FlowLayout;
import java.awt.Component;

public class WorkEx extends JFrame {

	private JPanel contentPane;
	private JPanel panelHeader;
	private JButton btnNewButton;
	private JButton btnNewButton_1;
	private JButton btnNewButton_2;
	private JButton btnNewButton_3;
	private JPanel panelCenter;
	private JLabel lblempno;
	private JTextField textField;
	private JPanel panelFooter;
	private JButton btnInsert;
	private JButton btnCancel;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					WorkEx frame = new WorkEx();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public WorkEx() {
		initialize();
	}
	private void initialize() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		panelHeader = new JPanel();
		contentPane.add(panelHeader, BorderLayout.NORTH);
		panelHeader.setLayout(new GridLayout(0, 4, 0, 0));
		
		btnNewButton = new JButton("New button");
		panelHeader.add(btnNewButton);
		
		btnNewButton_1 = new JButton("New button");
		panelHeader.add(btnNewButton_1);
		
		btnNewButton_2 = new JButton("New button");
		panelHeader.add(btnNewButton_2);
		
		btnNewButton_3 = new JButton("New button");
		panelHeader.add(btnNewButton_3);
		
		panelCenter = new JPanel();
		contentPane.add(panelCenter, BorderLayout.CENTER);
		
		lblempno = new JLabel("사원명");
		panelCenter.add(lblempno);
		
		textField = new JTextField();
		panelCenter.add(textField);
		textField.setColumns(10);
		
		panelFooter = new JPanel();
		contentPane.add(panelFooter, BorderLayout.SOUTH);
		panelFooter.setLayout(new GridLayout(0, 2, 0, 0));
		
		btnInsert = new JButton("입력");
		panelFooter.add(btnInsert);
		
		btnCancel = new JButton("취소");
		panelFooter.add(btnCancel);
		
		pack();
	}

}
